<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>康纳天花系统后台</title>
<link href="/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="/css/admins/base.css" rel="stylesheet" type="text/css">
<link href="/css/plugs/jDatepicker/jDatepicker-min.css"  rel="stylesheet"  /> 
<link href="/css/front/validate.css"  rel="stylesheet"  /> 

<script src="/js/plugs/jquery.js"></script>
<script src="/js/admins/base.js"></script>
<script src="/js/plugs/jquery.imgupload.js"></script>
<script src="/js/plugs/jDatepicker/jDatepicker-min.js"></script>
<script src="/js/front/validate.js"></script>
<script src="/js/admins/account_add.js"></script>
<style type="text/css" >
.add-form {
	width:100%;
}
.add-form input.form-control{
	width:30em;
}
.state-box {
	float: left;
    line-height: 33px;
    margin-left: 17px;
}
.state-box input {
	margin-right:5px;
}
.join-time-input {
	width:220px !important;
}
.form-control {
	border-radius:0px !important;
}

.remark-input {
	width:420px !important;
}

.permissions-setting {
	color: #999;
    font-size: 16px;
    margin: 5px;
}
.permissions-setting span {
	margin-right:5px !important;
}
.depart-sel {
	width:220px !important;
}
.uploader_item_box img {
    height: 85px !important;
    width: 85px !important;
}
#logo-up {
	z-index:10 !important;
}
#ui-datepicker-div{
	z-index:99999 !important;
}
.form-no {
	color:#F00;
}
.uploader_wait_con {
    height: 100px !important;
    padding: 15px 9px 9px !important;
    width: 100px !important;
}
</style>
</head>

<body>

<!-- nav start-->
{# include file="$tpl_root_path/admins/base/navbar.html" #}
<!-- nav end -->    
    
    
    
    
<div class="container-fluid">
    
      <div class="row">
      
    <!-- left  box start-->     
       {# include file="$tpl_root_path/admins/base/left_menu.html" #}
    <!-- left  box end-->        
 
  <!-- right  box start-->  
         
     <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main right-box">
          
          <div class="menu-navbar">{#$menu_navbar#}</div>
          <h3 class="page-header">添加管理员 </h3>
 
         
    
          <div class="info-list-box">
            
              <form method="post" action="" id="form-box">
                  <input name="uid" value="{#if $arrUser.ID#}{#$arrUser.ID#}{#/if#}"   type="hidden"/>
                  <div class="add-form  form-horizontal">
                  
                   <div class="form-group">
                      <label for="username" class="col-sm-2 control-label">用户名<span class="must-fill">*</span></label>
                      <div class="col-sm-10">
                        <input class="form-control" value="{#if $arrUser.USERNAME#}{#$arrUser.USERNAME#}{#/if#}" name="username" id="username"  placeholder="用户名" type="text" size="30" {#if !$arrUser.USERNAME#} defaultshow="2-20个字母或数字组成"  checkItem="isBlank:'T|请填写用户名',checkEnWord:'F|只能由英文、数字、下划线的组合',computeChar:'>2<20|字数必须在2-20之内'" {#/if#} {#if $arrUser.USERNAME#} readonly="readonly" {#/if#}>
                      </div>
                    </div>
                
                   <div class="form-group">
                      <label for="fullname" class="col-sm-2 control-label">姓名<span class="must-fill">*</span></label>
                      <div class="col-sm-10">
                        <input class="form-control" value="{#if $arrUser.NAME#}{#$arrUser.NAME#}{#/if#}" name="fullname"  id="fullname"  placeholder="姓名" type="text" size="30" defaultshow="2-20个字母或中文组成"  checkItem="isBlank:'T|请填写姓名',computeChar:'>2<20|字数必须在2-20之内'">
                      </div>
                    </div>
                    
                     <div class="form-group">
                      <label for="state" class="col-sm-2 control-label">性别<span class="must-fill">*</span></label>
                      <div class="state-box">
                          <input  type="radio" {#if $arrUser.SEX === '1' || !$arrUser #}checked="checked"{#/if#}  name="sex" value="1">男
                         &nbsp; <input   {#if $arrUser.SEX === '0'#}checked="checked"{#/if#} type="radio" name="sex" value="0">女
                      </div>
                    </div>
                    
                    <div class="form-group">
                      <label for="pwd" class="col-sm-2 control-label">密&nbsp;&nbsp;码<span class="must-fill">*</span></label>
                      <div class="col-sm-10">
                        <input class="form-control"  value="{#if $arrUser.OLDPASS#}{#$arrUser.OLDPASS#}{#/if#}" placeholder="密码" type="password" name="pwd" id="password"  defaultshow="6-30位字符,不支持空格和中文"  checkItem="isBlank:'T|请填写密码',checkPwd:'T|不能含有空白字符',checkWord:'T|不能包括中文',computeChar:'>6<30|字数必须在6-30之内'" >
                      </div>
                    </div>
                      
                    <div class="form-group">
                      <label for="repwd" class="col-sm-2 control-label">确认密码<span class="must-fill">*</span></label>
                      <div class="col-sm-10">
                        <input class="form-control"  placeholder="确认密码" type="password" name="repwd" id="sure_password" defaultshow="6-30位字符,不支持空格和中文"  checkItem="isBlank:'T|请填写密码',checkPwd:'T|不能含有空白字符',checkWord:'T|不能包括中文',computeChar:'>6<30|字数必须在6-30之内'" value="{#if $arrUser.OLDPASS#}{#$arrUser.OLDPASS#}{#/if#}" callFunc="passCallFunc">
                      </div>
                    </div>
                    
                    <div class="form-group">
                      <label for="jointime" class="col-sm-2 control-label">入职时间</label>
                      <div class="col-sm-10">
                      
                       <div class="input-right-gicos">
                          <span class="ico input-ico-calendar"></span>
                        <input class="form-control join-time-input" readonly="readonly" name="jointime" id="join_time"   placeholder="入职时间" value="{#if $arrUser.JOINTIME#}{#$arrUser.JOINTIME#}{#/if#}" type="text" >
                       </div>
          
                      </div>
                    </div>
                    
                     <div class="form-group">
                      <label for="depart" class="col-sm-2 control-label">所属部门</label>
                      <div class="col-sm-10">
                         <select class="form-control depart-sel" name="depart" >
                            <option  value="0" >不限</option>
                           {#if $arrDepartment#}
                              {#foreach key=key item=item from=$arrDepartment#}
                                  <option  value="{#$item.ID#}"  {#if $arrUser.GROUP_ID == $item.ID#} selected="selected"{#/if#} >{#$item.GROUPNAME#}</option>
                              {#/foreach#}
                           {#/if#}
                         </select>
                      </div>
                    </div>
                    
                    <div class="form-group">
                      <label for="logo" class="col-sm-2 control-label">头像</label>
                      <div class="col-sm-10">
                         <div  id="logo-up"></div>
                      </div>
                    </div>
                      
                    <div class="form-group">
                      <label for="mobile" class="col-sm-2 control-label">手机号码</label>
                      <div class="col-sm-10">
                        <input class="form-control" value="{#if $arrUser.MOBILE#}{#$arrUser.MOBILE#}{#/if#}"  placeholder="手机号码" type="text" name="mobile" id="mobile">
                      </div>
                    </div>
                    
                   <div class="form-group">
                      <label for="tel" class="col-sm-2 control-label">联系电话</label>
                      <div class="col-sm-10">
                        <input class="form-control"  placeholder="联系电话" type="text" name="tel" id="tel" value="{#if $arrUser.TEL#}{#$arrUser.TEL#}{#/if#}">
                      </div>
                    </div>
                    
                    
                         <div class="form-group">
                      <label for="qq" class="col-sm-2 control-label">QQ号码</label>
                      <div class="col-sm-10">
                        <input class="form-control" value="{#if $arrUser.QQ#}{#$arrUser.QQ#}{#/if#}" placeholder="QQ号码" type="text" name="qq" id="qqnum">
                      </div>
                    </div>
                    
                  <div class="form-group">
                      <label for="email" class="col-sm-2 control-label">邮箱</label>
                      <div class="col-sm-10">
                        <input class="form-control" value="{#if $arrUser.EMAIL#}{#$arrUser.EMAIL#}{#/if#}" placeholder="邮箱" type="text" name="email" id="email">
                      </div>
                    </div>
                    
                    
                      <div class="form-group">
                      <label for="remark" class="col-sm-2 control-label">备注</label>
                      <div class="col-sm-10">
                        <textarea  class="form-control remark-input"  cols="63" rows="10" name="remark" >{#if $arrUser.REMARK#}{#$arrUser.REMARK#}{#/if#}</textarea>
                      </div>
                    </div>
                      
                      
                      <div class="form-group">
                      <label for="state" class="col-sm-2 control-label">状态<span class="must-fill">*</span></label>
                      <div class="state-box">
                          <input  type="radio"  {#if $arrUser.STATE === '1' || !$arrUser #}checked="checked"{#/if#} name="state" value="1">正常
                         &nbsp; <input {#if $arrUser.STATE === '0'#}checked="checked"{#/if#}   type="radio" name="state" value="0">停用
                      </div>
                    </div>
                      
                </div>
                  
              <div class="permissions-setting">
              <span style=" float:left;line-height:35px;"><span class="glyphicon glyphicon-check"></span>权限设置</span>
              <span style=" float:left;line-height:35px; font-size:14px;" id="permissions_err_text"></span>
              </div> 
                 
              <table class="table table-hover" id="permissions-check-box">

                <tr>
                {#foreach key=key item=item from=$arrMenuParentList#}
                 {#if $key%3 eq 0#}
                </tr>

                    <tr>
                 {#/if#}
                    <td valign="top">
                      <table width="200">
                        <tr>
                          <td  height="22" colspan="2" class="t6">＋ {#$item.MENUNAME#}</td>
                          
                        </tr>
                        {#foreach key=keyc item=itemc from=$arrMenuChildList[$item.MENUID]#}
                        <tr>
                          <td width="18">&nbsp;</td>
                          <td width="185"> -> {#$itemc.MENUNAME#}</td>
                          <td width="90">
                            <input type="checkbox" id="check[{#$item.MENUID#}][]" name="check[]" value="{#$itemc.MENUID#}" class="input01 permissions-checkbox"  {#if $itemc.MENUNAME eq '修改密码' or $itemc.MENUNAME eq '退出系统'#} checked readonly {#else#} {#if $menuIdList[$itemc.MENUID]#}checked{#elseif $adminid == $uid #} checked {#/if#}{#/if#}>
                          </td>
                        </tr>
                        {#/foreach#}
                    </table>
                </td>
                {#/foreach#}
                 </tr>

          </table>
                  
                  <div class="form-group">
                      <div class="col-sm-offset-2 col-sm-10">
                        <button  type="button"  id="form-submit" class="btn btn-success">保&nbsp;&nbsp;存</button>
                        &nbsp;&nbsp;
                        <a  href="/admins/account_info.html" class="btn btn-default">返&nbsp;&nbsp;回</a>
                      </div>
                    </div>
                  
            </form>
      </div>
          
         

          
     </div>
 
  <!-- right  box end-->         
        
      </div>
</div>


<script type="text/javascript">
{#if $imgjs#}
{#$imgjs#}
{#else#}
  $.imgUploader({
        containerid:'logo-up',
        dir:'news',
        img_cnt_limit:1,
        max_file_size:1024*2,
        prevent_duplicates:1,
        extensions:'jpg,jpeg,gif,png',
        multi_selection:true,
        min_img_width:0,
        min_img_height:0,
        single_file:true
    });
{#/if#}

function passCallFunc(){
	var $password = $('#password');
	var $sure_password = $('#sure_password');
	var pval = spval = '';
	pval = $password.val();
	spval = $sure_password.val();
	if(pval!=spval){
        if($('#repwd_err_text')){
		   $('#repwd_err_text').html('<div class="form-no">两次输入密码不一致,请重新输入</div>');
		}
		return false;
	}else{
		$('#repwd_err_text').html('<div class="form-ok">&nbsp;</div>');
	}
}

</script>

</body>
</html>
